package com.chaosj.skill.guava.basic

import com.google.common.base.Joiner

/**
 * @Description:
 * @author: caoyangjie
 * @date: 2019年11月2019/11/26日 11:48
 * @Copyright: © 赢时胜
 */
class GuavaJoiner {
    static void main(args){
        Map map = new HashMap()
        map.put("1","2")
        map.put("2","4")
        map.put("4","8")
        println(Joiner.on(",").join(Arrays.asList("1","2","3","4")))
        println(Joiner.on(",").appendTo(new StringBuffer(),Arrays.asList("a","b","c")))
        println(Joiner.on(",").withKeyValueSeparator("=").join(map))
    }
}
